-- GENERATED SPELL FOR [Lost Shandaral Spirit] --


function spell0_31231(pUnit, Event) --@Moonfire,n/a--
pUnit:FullCastSpellOnTarget(15798,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31231', 12000, 1)
end

function spell1_31231(pUnit, Event) --@Regrowth,n/a--
pUnit:FullCastSpellOnTarget(16561,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31231', 23000, 1)
end

function Sorts_31231(pUnit, Event)
local choix_sorts_31231 = math.random(0, 1)
if choix_sorts_31231 == 0 then
pUnit:RegisterEvent('spell0_31231', 1, 1)
end
if choix_sorts_31231 == 1 then
pUnit:RegisterEvent('spell1_31231', 1, 1)
end
end

function mob31231_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31231', math.random(1500, 3000), 1)
end

function mob31231_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31231_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31231_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31231, 1, 'mob31231_Action')
RegisterUnitEvent(31231, 2, 'mob31231_Leave')
RegisterUnitEvent(31231, 3, 'mob31231_Kill')
RegisterUnitEvent(31231, 4, 'mob31231_Die')
